package com.ruoyi.eqmonitor.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.eqmonitor.dispose.task.JumpChangeTask;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("jump")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class OptJumpController {

    @NonNull
    private JumpChangeTask jumpChangeTask;

    @RequestMapping("runTask")
    public AjaxResult runTask(){
        jumpChangeTask.validateNew();
        return AjaxResult.success();
    }
}
